#ifndef CALCULATORINTERFACE_H
#define CALCULATORINTERFACE_H

#include <QWidget>
class CalculatorProcessingMessage;

namespace Ui {
class CalculatorInterface;
}

class CalculatorInterface : public QWidget
{
    Q_OBJECT
    
public:
    explicit CalculatorInterface(QWidget *parent = 0);
    ~CalculatorInterface();
    bool eventFilter(QObject *target, QEvent *event);
    
protected:
//    void keyPressEvent(QKeyEvent *);

private slots:
    void slotDisplay(QString);
    void slotDisplayResult(QString);
    void slotDisplayBackSpace(QString);
    void slotDisplayError(QString);

    void on_pushButton_0_clicked();
    void on_pushButton_1_clicked();
    void on_pushButton_8_clicked();
    void on_pushButton_2_clicked();
    void on_pushButton_3_clicked();
    void on_pushButton_4_clicked();
    void on_pushButton_5_clicked();
    void on_pushButton_6_clicked();
    void on_pushButton_7_clicked();
    void on_pushButton_9_clicked();

    void on_pushButton_point_clicked();         //.
//    void on_pushButton_Symbol_clicked();        //±
    void on_pushButton_Percent_clicked();       //%
    void on_pushButton_Sqrt_clicked();          //√
    void on_pushButton_Square_clicked();        //x²

    void on_pushButton_Add_clicked();
    void on_pushButton_Subtract_clicked();
    void on_pushButton_Multiplication_clicked();
    void on_pushButton_Division_clicked();

    void on_pushButton_LeftParentheses_clicked();    //(
    void on_pushButton_RightParentheses_clicked();   //)

    void on_pushButton_BackSpace_clicked();
    void on_pushButton_Clear_clicked();
    void on_pushButton_Equal_clicked();              //=

    void on_pushButton_Factorial_clicked();

    void on_pushButton_nthPower_clicked();

private:
    Ui::CalculatorInterface *ui;
    CalculatorProcessingMessage *m_calculator;

    bool ClickEqual;
//    bool m_showLineEditError;
};

#endif // CALCULATORINTERFACE_H
